Optimal. Leaf size=22 \[ \frac {(a+b \sin (c+d x))^2}{2 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.27, number of steps
used = 2, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {2747}
\begin {gather*} \frac {a \sin (c+d x)}{d}+\frac {b \sin ^2(c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2747
Rubi steps
\begin {align*} \int \cos (c+d x) (a+b \sin (c+d x)) \, dx &=\frac {\text {Subst}(\int (a+x) \, dx,x,b \sin (c+d x))}{b d}\\ &=\frac {a \sin (c+d x)}{d}+\frac {b \sin ^2(c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 39, normalized size = 1.77 \begin {gather*} -\frac {b \cos ^2(c+d x)}{2 d}+\frac {a \cos (d x) \sin (c)}{d}+\frac {a \cos (c) \sin (d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 25, normalized size = 1.14
method | result | size |
derivativedivides | \(\frac {\frac {\left (\sin ^{2}\left (d x +c \right )\right ) b}{2}+a \sin \left (d x +c \right )}{d}\) | \(25\) |
default | \(\frac {\frac {\left (\sin ^{2}\left (d x +c \right )\right ) b}{2}+a \sin \left (d x +c \right )}{d}\) | \(25\) |
risch | \(\frac {a \sin \left (d x +c \right )}{d}-\frac {b \cos \left (2 d x +2 c \right )}{4 d}\) | \(28\) |
norman | \(\frac {\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) | \(67\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 20, normalized size = 0.91 \begin {gather*} \frac {{\left (b \sin \left (d x + c\right ) + a\right )}^{2}}{2 \, b d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 25, normalized size = 1.14 \begin {gather*} -\frac {b \cos \left (d x + c\right )^{2} - 2 \, a \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 34 vs.
\(2 (15) = 30\).
time = 0.07, size = 34, normalized size = 1.55 \begin {gather*} \begin {cases} \frac {a \sin {\left (c + d x \right )}}{d} + \frac {b \sin ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\left (c \right )}\right ) \cos {\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 6.46, size = 25, normalized size = 1.14 \begin {gather*} \frac {b \sin \left (d x + c\right )^{2} + 2 \, a \sin \left (d x + c\right )}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 23, normalized size = 1.05 \begin {gather*} \frac {\sin \left (c+d\,x\right )\,\left (2\,a+b\,\sin \left (c+d\,x\right )\right )}{2\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________